Optimal. Leaf size=43 \[ -\frac {A}{a x}-\frac {(A b-a B) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{a^{3/2} \sqrt {b}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {464, 211}
\begin {gather*} -\frac {(A b-a B) \text {ArcTan}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{a^{3/2} \sqrt {b}}-\frac {A}{a x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 464
Rubi steps
\begin {align*} \int \frac {A+B x^2}{x^2 \left (a+b x^2\right )} \, dx &=-\frac {A}{a x}-\frac {(A b-a B) \int \frac {1}{a+b x^2} \, dx}{a}\\ &=-\frac {A}{a x}-\frac {(A b-a B) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{a^{3/2} \sqrt {b}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 42, normalized size = 0.98 \begin {gather*} -\frac {A}{a x}+\frac {(-A b+a B) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{a^{3/2} \sqrt {b}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 37, normalized size = 0.86
method | result | size |
default | \(\frac {\left (-A b +B a \right ) \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{a \sqrt {a b}}-\frac {A}{a x}\) | \(37\) |
risch | \(-\frac {A}{a x}+\frac {\left (\munderset {\textit {\_R} =\RootOf \left (a^{3} \textit {\_Z}^{2} b +A^{2} b^{2}-2 A B a b +B^{2} a^{2}\right )}{\sum }\textit {\_R} \ln \left (\left (3 \textit {\_R}^{2} a^{3} b +2 A^{2} b^{2}-4 A B a b +2 B^{2} a^{2}\right ) x +\left (A \,a^{2} b -B \,a^{3}\right ) \textit {\_R} \right )\right )}{2}\) | \(99\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.51, size = 36, normalized size = 0.84 \begin {gather*} \frac {{\left (B a - A b\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} a} - \frac {A}{a x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.91, size = 105, normalized size = 2.44 \begin {gather*} \left [\frac {{\left (B a - A b\right )} \sqrt {-a b} x \log \left (\frac {b x^{2} + 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right ) - 2 \, A a b}{2 \, a^{2} b x}, \frac {{\left (B a - A b\right )} \sqrt {a b} x \arctan \left (\frac {\sqrt {a b} x}{a}\right ) - A a b}{a^{2} b x}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 82 vs.
\(2 (36) = 72\).
time = 0.18, size = 82, normalized size = 1.91 \begin {gather*} - \frac {A}{a x} - \frac {\sqrt {- \frac {1}{a^{3} b}} \left (- A b + B a\right ) \log {\left (- a^{2} \sqrt {- \frac {1}{a^{3} b}} + x \right )}}{2} + \frac {\sqrt {- \frac {1}{a^{3} b}} \left (- A b + B a\right ) \log {\left (a^{2} \sqrt {- \frac {1}{a^{3} b}} + x \right )}}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.35, size = 36, normalized size = 0.84 \begin {gather*} \frac {{\left (B a - A b\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} a} - \frac {A}{a x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.03, size = 35, normalized size = 0.81 \begin {gather*} -\frac {A}{a\,x}-\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )\,\left (A\,b-B\,a\right )}{a^{3/2}\,\sqrt {b}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________